#include<iostream>
using namespace std;

class Base {
    public:
        virtual void print() {
            cout << "In Base" << endl;
        }
};

class Derived : public Base {
    public:
        void print() {
            cout << "In Derived" << endl;
        }
};

void display(Base * pb,void(Base :: *pf) ()) {
    (pb ->*pf)();
}

int main (){
    Derived d;
    Base *pb = &d;
    void (Base::*pf)();
    pf = Base ::print;
    //display(pb,pf);
    return 0;
}
